package fun.coding.design.pattern;

import java.util.ArrayList;
import java.util.List;
import java.util.Observable;

public class ObservableGraph extends Observable{

	public void dependencyAllSubmitted() {
		setChanged();
		notifyObservers();
	}
	
	public void addNode(Object node) {
		// first add a node to the graph
		if (this.isAllDependencyReady(node)) {
			this.dependencyAllSubmitted();
		}
	}
	
	private boolean isAllDependencyReady(Object node) {
		// TODO: add your logic here. 
		return true;
	}
	
	public List<NodeObserver> getAllDependency(Object node) {
		// TODO: add your logic here. 
		return new ArrayList<NodeObserver>();
	}
}
